package tech.dingxin.tiny.mall.service;

import tech.dingxin.tiny.mall.mbg.model.PmsBrand;

import java.util.List;

/**
 * @author Administrator
 */
public interface PmsBrandService {
    /**
     * list all brand
     * @return List<PmsBrand>
     */
    List<PmsBrand> listAllBrand();

    /**
     * insert brand into database
     * @param brand PmsBrand
     * @return 0:failed 1:success
     */
    int createBrand(PmsBrand brand);

    /**
     * update brand by id
     * @param id Long
     * @param brand PmsBrand
     * @return 0:failed 1:success
     */
    int updateBrand(Long id, PmsBrand brand);

    /**
     * delete brand from database by id
     * @param id long
     * @return 0:failed 1:success
     */
    int deleteBrand(Long id);

    /**
     * list a page of brand
     * @param pageNum the number of page
     * @param pageSize how many brand one page have
     * @return list of brand
     */
    List<PmsBrand> listBrand(int pageNum, int pageSize);

    /**
     * get brand by id
     * @param id long
     * @return PmsBrand
     */
    PmsBrand getBrand(Long id);

}
